home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00161_Mode routines.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.8 KB  |  70 lines

  1. on startMainBarMode newMode
  2.   global gPourableItemsList, gMode, gBarGlassSprites
  3.   gPourableItemsList = [49, 51, 53, 81, 85, 89]
  4.   repeat with X in gBarGlassSprites
  5.     add(gPourableItemsList, X)
  6.   end repeat
  7.   if not voidp(newMode) then
  8.     gMode = newMode
  9.   end if
  10. end
  11.  
  12. on startBonusMode newMode
  13.   global gPourableItemsList, gMode, gBonusStartTime, gPauseTime, gRightAnswers, gWrongAnswers, gSoundTrack, gGameLevel
  14.   gRightAnswers = 0
  15.   gWrongAnswers = 0
  16.   gPauseTime = 0
  17.   if not voidp(newMode) then
  18.     gMode = newMode
  19.   end if
  20.   gPourableItemsList = [49, 51, 53, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
  21.   gSoundTrack = getAt(["BRM_A02", "BRM_A01"], (gGameLevel mod 2) + 1)
  22.   gBonusStartTime = now()
  23. end
  24.  
  25. on move_dummy whichWindow, newRect
  26.   global gDragRect, gPauseState, gActiveWindow
  27.   gActiveWindow = whichWindow
  28.   sprite(gDragRect).rect = offset(newRect, -(the stageLeft), -(the stageTop))
  29.   updateStage()
  30. end
  31.  
  32. on dropDraggingWindow
  33.   if the activeWindow = the stage then
  34.     drop_window()
  35.   else
  36.     tell the stage
  37.       drop_window()
  38.     end tell
  39.   end if
  40. end
  41.  
  42. on drop_window whichWindow, newRect
  43.   global gPauseState, gActiveWindow, gDragRect, gRecipeWindow
  44.   if voidp(whichWindow) then
  45.     whichWindow = gActiveWindow
  46.   end if
  47.   gActiveWindow = the stage
  48.   if not isWindow(whichWindow) then
  49.     exit
  50.   end if
  51.   if whichWindow = the stage then
  52.     exit
  53.   else
  54.     if isVisible(whichWindow) then
  55.       if not voidp(newRect) then
  56.         whichWindow.rect = newRect
  57.         rememberWindowRects()
  58.       end if
  59.       if whichWindow = gRecipeWindow then
  60.         patron = findActiveRecipeSlot()
  61.         newLabel = "current" & patron
  62.         if not recipeWindowAtLabel(newLabel) then
  63.           refreshRecipes(patron)
  64.         end if
  65.       end if
  66.     end if
  67.   end if
  68.   hideDragRect()
  69. end
  70.